package com.my.study.designPatterns.abstractFactoryPattern;

public class ChicagoPizza extends Pizza {

    private IngredientFactory ingredientFactory;


    public ChicagoPizza(IngredientFactory ingredientFactory) {
        this.ingredientFactory = ingredientFactory;
        name = "Chicago Pizza";
    }

    @Override
    void prepare() {
        System.out.println("Preparing :" + name);
        System.out.println("Tossing dough---" + ingredientFactory.createDough());
        System.out.println("Addding asuce...." + ingredientFactory.createSauce());
        System.out.println("Adding topping: " + ingredientFactory.createVegetables());
    }
}
